package com.qf.base.service.impl;

import com.alibaba.excel.EasyExcel;
import com.qf.base.domain.BaseCustomer;
import com.qf.base.mapper.BaseCustomerMapper;
import com.qf.base.service.IBaseCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * --- ONE PIECE ---
 *
 * @author yangjiangcheng
 * @date 2025/9/2
 * @desc
 */
@Service
public class BaseCustomerServiceImpl implements IBaseCustomerService {
    @Autowired
    private BaseCustomerMapper baseCustomerMapper;
    @Override
    public List<BaseCustomer> selectCustomerList(BaseCustomer customer) {
        return baseCustomerMapper.selectCustomerList(customer);
    }

    @Override
    public int insertCustomer(BaseCustomer customer) {
        return baseCustomerMapper.insertCustomer(customer);
    }

    @Override
    public BaseCustomer selectCustomerById(Long id) {
        return baseCustomerMapper.selectCustomerById(id);
    }

    @Override
    public int updateCustomer(BaseCustomer customer) {
        return baseCustomerMapper.updateCustomer(customer);
    }

    @Override
    public int deleteCustomerByIds(Long[] ids) {
        return baseCustomerMapper.deleteCustomerByIds(ids);
    }




    @Override
    public void insertBatch(List<BaseCustomer> cachedDataList) {
        System.out.println("cachedDataList = " + cachedDataList);
        baseCustomerMapper.saveBatch(cachedDataList);
    }


}
